package org.monkey4j.suppliers;

import java.util.Collection;

import com.google.common.base.Supplier;

/**
 * Factory for looking up {@link Supplier}s based on some data type.
 * 
 * @author hillger.t
 */
public final class SupplierFactory {
	private final SupplierRegistry registry = new SupplierRegistry();

	private SupplierFactory() {
	}

	public static SupplierFactory newInstance() {
		return new SupplierFactory();
	}

	public Supplier<? extends Collection<?>> newSupplier(Class<?> classType) {
		return registry.lookup(classType);
	}
}
